#ifndef DECODER_H
#define DECODER_H

#include <QThread>
#include <QImage>

class Decoder : public QThread
{
    Q_OBJECT
public:
    Decoder(QObject * parent = nullptr);

    void setUrl(QString& url);
    int getRunState() { return m_runState; }
signals:
    void sendFrame(QImage image);
protected:
    void run() Q_DECL_OVERRIDE;

    void errString(int s32Ret);
private:
    QString m_url;
    int m_runState;
};

#endif // DECODER_H
